import service from '@/utils/http.js'

// 客流数据

export const index_index = (params) => {
  return service({
    url: 'manage/census.index/index',
    method: 'post',
    data: params
  }) 
}
// 客流分析
export const analyse = (params) => {
  return service({
    url: 'manage/census.index/analyse',
    method: 'post',
    data: params
  }) 
}

// 财务统计
export const finance = (params) => {
  return service({
    url: 'manage/finance.finance/index',
    method: 'post',
    data: params
  }) 
}

// 我的场地 /sass-test/public/index.php/api/court/getMyCourt
export const getMyCourt = (params) => {
  return service({
    url: 'manage/court.index/getMyCourt',
    method: 'post',
    data: params
  })
}

//场地详情  /sass-test/public/index.php/api/court/getMyCourtDetail
export const getMyCourtDetail = (params) => {
  return service({
    url: 'api/court/getMyCourtDetail',
    method: 'post',
    data: params
  })
}

// 订单类型分析
export const stat_order = (params) => {
  return service({
    url: 'manage/index/stat_order',
    method: 'post',
    data: params
  }) 
}

// 订单数量统计
export const order = (params) => {
  return service({
    url: 'manage/index/order',
    method: 'post',
    data: params
  }) 
}

// 会员销售排行
export const member = (params) => {
  return service({
    url: 'manage/index/member',
    method: 'post',
    data: params
  }) 
}
// 个人排行
export const sportsSort = (params) => {
  return service({
    url: 'manage/index/sportsSort',
    method: 'post',
    data: params
  }) 
}
// 卡排行
export const sportsCardSort = (params) => {
  return service({
    url: 'manage/index/sportsCardSort',
    method: 'post',
    data: params
  }) 
}

// 产品热销排行
export const top_sale = (params) => {
  return service({
    url: 'manage/index/top_sale',
    method: 'post',
    data: params
  }) 
}

// 日志列表
export const op_log = (params) => {
  return service({
    url: 'manage/index/op_log',
    method: 'post',
    data: params
  }) 
}

// 教练列表
export const coachindex = (params) => {
  return service({
    url: 'manage/train.coach/index',
    method: 'post',
    data: params
  }) 
}

// 教练个人信息
export const info = (params) => {
  return service({
    url: 'manage/train.coach/info',
    method: 'post',
    data: params
  }) 
}


//教练班级列表
export const classes = (params) => {
  return service({
    url: 'manage/train.coach/classes',
    method: 'post',
    data: params
  }) 
}


//班级学员列表
export const students = (params) => {
  return service({
    url: 'manage/train.coach/students',
    method: 'post',
    data: params
  }) 
}


//班级课节列表
export const class_times = (params) => {
  return service({
    url: 'manage/train.coach/class_times',
    method: 'post',
    data: params
  }) 
}


//学员信息
export const student = (params) => {
  return service({
    url: 'manage/train.coach/student',
    method: 'post',
    data: params
  }) 
}

// 课节学员列表
export const hour_students = (params) => {
  return service({
    url: 'manage/train.coach/hour_students',
    method: 'post',
    data: params
  }) 
}

//课节学员列表
export const student_times = (params) => {
  return service({
    url: 'manage/train.coach/student_times',
    method: 'post',
    data: params
  }) 
}
//产品中心统计首页
export const getProductProNum = (params) => {
  return service({
    url: 'manage/product_center.Index/getProductProNum',
    method: 'post',
    data: params
  }) 
}

//产品列表页
export const product_list = (params) => {
  return service({
    url: 'manage/product_center.Index/list',
    method: 'post',
    data: params
  }) 
}

//产品列表页
export const detail = (params) => {
  return service({
    url: 'manage/product_center.Index/detail',
    method: 'post',
    data: params
  }) 
}
//上下架
export const up_and_down = (params) => {
  return service({
    url: 'manage/product_center.Index/up_and_down',
    method: 'post',
    data: params
  }) 
}
// 审批统计
export const countPoint = (params) => {
  return service({
    url: 'api/approval/countPoint',
    method: 'post',
    data: params
  }) 
}

// 待审核列表
export const waitAudit = (params) => {
  return service({
    url: 'api/approval/waitAudit',
    method: 'post',
    data: params
  }) 
}

// 通过和拒绝列表
export const pass_and_nopass = (params) => {
  return service({
    url: 'api/approval/pass_and_nopass',
    method: 'post',
    data: params
  }) 
}

// 审批详情
export const getDetail = (params) => {
  return service({
    url: 'api/approval/getDetail',
    method: 'post',
    data: params
  }) 
}

// 拒绝审核
export const rejectAudit = (params) => {
  return service({
    url: 'api/approval/rejectAudit',
    method: 'post',
    data: params
  }) 
}

// 通过审核和复核
export const doAudit = (params) => {
  return service({
    url: 'api/approval/doAudit',
    method: 'post',
    data: params
  }) 
}

// 订场率
export const orderPercent = (params) => {
  return service({
    url: 'manage/court.index/orderPercent',
    method: 'post',
    data: params
  }) 
}

export const gertOrderSourceLabel = (params) => {
  return service({
    url: 'manage/court.index/gertOrderSourceLabel',
    method: 'post',
    data: params
  }) 
}
export const fenxi = (params) => {
  return service({
    url: 'manage/court.index/fenxi',
    method: 'post',
    data: params
  }) 
}
export const countByEverCourt = (params) => {
  return service({
    url: 'manage/court.index/countByEverCourt',
    method: 'post',
    data: params
  }) 
}
export const orderSource = (params) => {
  return service({
    url: 'manage/court.index/orderSource',
    method: 'post',
    data: params
  }) 
}
export const enroll_report = (params) => {
  return service({
    url: 'mini/train.report/enroll_report',
    method: 'post',
    data: params
  }) 
}
export const getCardRecords = (params) => {
  return service({
    url: 'mini/card/getCardRecords',
    method: 'post',
    data: params
  }) 
}
export const area_info = (params) => {
  return service({
    url: 'mini/train.report/area_info',
    method: 'post',
    data: params
  }) 
}

export const CustomerFlow = (params) => {
  return service({
    url: 'mini/CustomerFlow/CustomerFlow',
    method: 'post',
    data: params
  }) 
}